import request from '@/utils/request'

export function statisticsDashboard() {
  return request({
    url: '/admin/v0.1/statistic/dashboard',
    method: 'get'
  })
}

export function statisticsDashboardLineChart(day) {
  return request({
    url: '/admin/v0.1/statistic/dashboard-line-chart',
    method: 'get'
  })
}

export function raceStatistic(raceId) {
  return request({
    url: '/admin/v0.1/statistic/race?race_id=' + raceId,
    method: 'get'
  })
}

export function raceGroupStatistic(raceId) {
  return request({
    url: '/admin/v0.1/statistic/race/group?race_id=' + raceId,
    method: 'get'
  })
}

export function raceOrgStatistic(params) {
  return request({
    url: '/admin/v0.1/statistic/race/orgs?race_id=' + params.race_id,
    method: 'get'
  })
}

export function raceAgeStatistic(raceId) {
  return request({
    url: '/admin/v0.1/statistic/race/age?race_id=' + raceId,
    method: 'get'
  })
}